Repository navigation
feat(console): the design mode is entered from the app-name menu; the page header drops Edit app and Open in Studio (#36485) - #36621
Conversation
…he page header drops Edit app and Open in Studio Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm Co-authored-by: Claude <noreply@anthropic.com>
…eset Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm Co-authored-by: Claude <noreply@anthropic.com>
…sign-entry-app-menu
|
repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm Flake reading — PR #36621 @ f7d907a · 2026-11-23T04:18Z
|
|
repo:objectstack#2 · os-steve · session_01ADHkmRB34k9WUWeGpRnVNm 席位核对ACCEPT — PR #36621 @ f7d907a (head of record, full sha on the PR) · card #36485 · L1 first read by area s2-B (area order rule 9) · 2026-11-23T04:36Z · no contract review owed (
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45112953275 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steve · project thread
Fixes #36485
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
SidebarAppMenu): a new 「Edit app」 item (sidebar-app-menu-edit-app, thetopbar.editAppkey every locale already carries, no new i18n key) under the app list, in one group with 「Add app」 (one rule above the group, none between the two). Choosing it calls the shell'suseDesignMode().enterfor the app on screen: no navigation, no Studio.useStudioEntryGate(the gateuseAppStudioEntryreads) answers non-null, i.e.useWorkspaceAdminStatus().isAdminANDuseCanAuthorMetadata()(the server-reportedmanage_metadatacapability) AND the app's package is oneGET /api/v1/packageslists (not a kernel package: Setup, Studio, Account get none); a read-only package (posture: 'view') only where the customization door takes the caller (!postureHasOrgWall(useTenancyPosture()) || user.isPlatformAdmin), as 设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363 set it. It reads the app's own Studio path (appStudioDesignPath); the gate judges the package id only, so the answer is the one the header got on every route.ConsoleLayout's provider).ShellPageActions):EditAppButtonis deleted: no 「Edit app」 and no 「Open {app} in Studio」 in the group on any route. The group now reads no Studio gate at all (useAppStudioEntry(false), app only, for the help menu's package).useAppStudioEntrystays:AppHeader(the top bar still drawn below 768 px and on docs pages) reads it.mainan installed (read-only) app already enters the mode (设计模式(二)菜单编辑:添加已有的菜单项,上移下移、移到分组、移除、改名和图标 #36363 landed), so in this PR an installed app's menu item behaves exactly as a self-built one's. Its one exception is the walled-deployment case above: there the item is absent (the header showed the eye into Studio; that eye is gone with the header buttons, so such a caller reaches Studio through the app switcher's row or Studio's landing).chrome/OnboardingWalkthrough.tsxis a stub that renders nothing, and no other tour exists in the console.Tests
Pins added or rewritten (vitest, root ui/)
SidebarAppMenu-36112.test.tsx, new top-level describe 「Edit app」 in the app menu enters the design mode: placement under the list with one rule before the group; choosing it turns the realuseDesignModeControlleron and the item is gone while on; a read-only package's app has it and enters; walled + read-only gets none, walled + writable keeps it; controls: a member, an admin withoutmanage_metadata, the Setup app (package not listed), no shell holding the mode. The package list is the stubbedfetch; the file-levelbeforeEachnow stubs it for every test, since the menu reads the gate for admins.ShellPageActions-36111.test.tsx: the group's order is comments then help; the old 「Edit app」 / eye / design-mode-button describes are replaced by one asserting neither entry (test id and accessible name) for writable and read-only packages, with and without a design-mode shell, walled, and for a member.UnifiedSidebar.hiddenCollapse-35062.test.tsx, new top-level describe: sidebar collapsed at 1024 px, floated by a press on the left edge, the real Radix app menu opened from inside the float offers 「Edit app」, and choosing it turns the mode on.Runs at f7d907a
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/layout/__tests__/plusObjectView.shellPageActions-36111,RecordDetailView.topBar-27524,PageView.consoleHeader-36111(lock VERDICT command-exit 0): Test Files 157 passed (157), Tests 1255 passed (1255). Run at 2b4666e plus the test edits; the float pin and typing commit followed, re-run: the two harness files 36/36.pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsconfig.test.json): VERDICT command-exit 0.Ablation (one-shot, not kept)
node scripts/ablation-replace.mjs --file ui/packages/app-shell/src/layout/SidebarAppMenu.tsx --anchor '{enterDesignMode && EDIT_APP_ITEM_ELEMENT}' --delete -- vitest …(anchor 1 → 0, blob 367de8db → 71946a69): 5 failed | 31 passed: every positive pin in both harnesses red, every control green; restored blob 367de8db = HEAD.ShellPageActions.tsxswapped for its base-commit text under an EXIT trap: 3 failed | 5 passed (the order pin and both no-entry pins red; the member control and the scope pins green); restored blob 2e640646 = HEAD,git statusclean.Acceptance notes
--fresh; Console dev server pointed at it), 1440 px. HotCRM is not in this container: the CRM example'scom.example.crmis a code package served read-only, so it stands in for the installed app; a writable app was made for the self-built case (POST /api/v1/packagescom.acme.mineplus appmy_salessaved into it).CRM · Setup · (My Sales) · Edit app · Add app; choosing 「Edit app」 draws the design-mode bar; reopening the menu in the mode shows no 「Edit app」; collapsed sidebar, floated from the edge: item present, choosing it draws the bar.CRM, no 「Edit app」.PageView.consoleHeader-36111/ObjectView.shellPageActions-36111/RecordDetailView.topBar-27524stayed green./mnt/project-files/objectstack-seat2/:36485-before-crm-readonly-header.png,36485-before-selfbuilt-writable-header.png/36485-after-crm-readonly-header.png,36485-after-selfbuilt-writable-header.png36485-before-crm-readonly-app-menu.png/36485-after-crm-readonly-app-menu.png,36485-after-selfbuilt-writable-app-menu.png36485-after-*-design-mode-on.png,36485-after-*-app-menu-in-mode.png; float:36485-after-*-float-app-menu.png,36485-after-*-float-design-mode-on.png; member:36485-after-member-app-menu.pngAppHeader, outside this card's file surface): it opens Studio, not the mode. Left as is; named in the report for the seat.designMode.tsx's docblock still says the mode is entered from the page header's 「Edit app」 (ShellPageActions); the file is read-only here (open PR feat(console): create a dashboard from the design mode's Add menu item #36606 edits it).ui/packages/app-shell/README.md's "App → Studio reverse bridge" describes the top bar only and does not mention the mode's door; also outside the file surface. Both named in the report.Verification
Read first:
ui/packages/app-shell/src/layout/SidebarAppMenu.tsx,useEnterDesignMode: the gate carried over from the header; the risk is a viewer who saw the header button and now sees no menu item, or the reverse.ui/packages/app-shell/src/layout/ShellPageActions.tsx,ShellPageActionsGroup: the group no longer reads the gate.UnifiedSidebar.hiddenCollapse-35062.test.tsx, the new last describe: the float path.Two-minute check: as an admin, open any app page at desktop width, click the app name at the top left: 「Edit app」 sits under the app list above 「Add app」; click it and the blue Design mode bar appears; the page header's top-right has only the AI and help buttons.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmRB34k9WUWeGpRnVNm